package com.lsy.poi.row;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

import com.lsy.poi.Student;

//import org.apache.commons.beanutils.BeanUtils;
//import org.apache.commons.beanutils.PropertyUtils;

//TODO：MyRowMapper 可以 跳空行
//所谓的 调控行是 在 注入 List 时，不加入 这一行
public class MyRowMapper extends RowMapper<Student> {

	public MyRowMapper(String[] propertyNames, Class<Student> clazz) {
		super(propertyNames, clazz);
	}
	
	@Override
	public void mapRow(List<Student> eleList, Object[] cellValues) 	throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
//		super.mapRow(eleList, cellValues);
		
		Student ele = setProperties(cellValues);
		
		if(ele.getName() == null) {
			
		}else {
			eleList.add(ele);
		}
		
	}

//	public void mapRow(List<T> eleList, Object[] cellValues) throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
//		Object ele = setProperties(cellValues);
//		
//		//不收集 空行
////		if()
//		
//		eleList.add(ele);
//	}


}
